import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss'

import App from './App'
import store from './store'
import shortcutVuex from '@/store/mixin.js'
import router from './router'

import '@/icons'
import '@/permission'
import '@/utils/error-log'

import filters from '@/filters'
import directives from '@/directives'

// import { mockXHR } from '../mock'
// if (process.env.NODE_ENV === 'development') {
//   mockXHR()
// }

Vue.use(shortcutVuex)

Vue.use(ElementUI, { size: Cookies.get('size') || 'medium' })

Vue.use(filters)

Vue.use(directives)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
